package com.live.stamp.web.user.service;

import com.live.stamp.web.sms.service.model.SmsModel;
import com.live.stamp.web.user.model.TUser;
import com.live.stamp.web.user.vo.TUserVo;
import org.springframework.boot.container.core.common.BusinessException;

import java.util.List;


/**
 * @author cwd E-mail: wendong.cao@jsxfedu.com
 * @version 1
 * @date 2018/3/23 11:12
 */
public interface UserService {

    /**
     * 用户登录
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
    String login(TUserVo tUserVo) throws BusinessException;

    /**
     * 用户注册
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
    String register(TUserVo tUserVo) throws BusinessException;

    String sendVerCode(SmsModel smsModel) throws BusinessException;

    /**
     * 重置密码
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
    String resetPassword(TUserVo tUserVo) throws BusinessException;

    /**
     * 更新用户最后一次查看朋友圈时间
     * @param userId
     * @return
     * @throws BusinessException
     */
    int updateLookFriendTime(String userId) throws BusinessException;

    /**
     * 更新用户最后一次查看关注圈时间
     * @param userId
     * @return
     * @throws BusinessException
     */
    int updateLooAttenTime(String userId) throws BusinessException;

    TUserVo getUser(TUserVo tUserVo) throws BusinessException;

    /**
     * 好友列表
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
   List<TUserVo> amityList(TUserVo tUserVo) throws BusinessException;

    /**
     * 搜索好友
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
    List<TUser> queryUserList(TUserVo tUserVo) throws BusinessException;


    /**
     * 申请添加好友
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
   String reqAddFriend(TUserVo tUserVo) throws BusinessException;

    /**
     * 屏蔽用户
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
    String shieldUser(TUserVo tUserVo) throws BusinessException;

    String cancelShieldUser(TUserVo tUserVo) throws BusinessException;

    /**
     * 处理好友请求
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
   String handleReqFriend(TUserVo tUserVo) throws BusinessException;

   String deleteFriend(TUserVo tUserVo) throws BusinessException;

    /**
     * 处理关注
     * @param tUserVo
     * @return
     * @throws BusinessException
     */
    String handleAttention(TUserVo tUserVo) throws BusinessException;

    String updateUserInfo(TUserVo tUserVo) throws BusinessException;

    /**
     * 两个用户是否为好友
     * @param userAId
     * @param userBId
     * @return
     * @throws BusinessException
     */
    boolean isFriend(String userAId, String userBId) throws BusinessException;

    boolean isAttent(String userAId, String userBId) throws BusinessException;
}
